function getTime(num1, num2) {
    $.ajax({
                url: `${Url}/Wechat/Api/PeriodBloodGlucose?IdentityNo=${theRequest.IdentityNo}&BeginTime=${num1}&EndTime=${num2}`,
                type: 'get',
                datatype: 'json',
                headers: {
                    'Authorization': Authorization
                },
                // data: responseData,
                async: false,
                success: function(res) {
                        var num6 = res.data.BloodGlucoseItems;
                        var CheckDate = [];
                        var Glucose = [];
                        if (num6.length > 0) {
                            $('#tabletext').css('display', 'block')
                            for (let key in num6) {
                                var con = num6[key]
                                var title = '';
                                CheckDate.push(con.CheckDate);
                                Glucose.push(con.Glucose);
                            }
                        } else {
                            $('#tabletext').css('display', 'none')
                        }
                        let teplhtml = `
            ${num6.map(item=>{
              return `<tr><td>${item.CheckDate}</td><td>${item.Glucose}</td></tr>`
          }).join('')
      }
           `
            $('#tabletext').html(teplhtml);
            var startLength = 100 - (5 / CheckDate.length * 100);
            var myChart2 = echarts.init(document.getElementById('main1'));
            option2 = {
                title: {
                    text: '血糖检测数据',
                    subtext: '血糖参考值:3.61--6.11mmol/L',
                    x: 'right',
                },
                grid: {
                    top: "30%",
                    right: "10%",
                    bottom: '20%',
                    //     width: "66%",
                    left: "10%",
                    //     containLabel: true,
                    //     height: "55%"
                },
                legend: {
                    orient: 'vertical',
                    x: 'left',
                    y: 'top',
                    data: ['血糖数值'],

                },
                xAxis: {
                    show:false,
                    data: CheckDate,
                    axisLabel: {
                        interval: 0,
                    },

                },
                yAxis: {
                    max: 30,
                    min:0

                },
                series: [{
                    name: '血糖数值',
                    type: 'line',
                    data: Glucose,
                    markLine: {
                        symbol: ['none', 'none'], //去掉箭头
                        itemStyle: {
                            normal: {
                                lineStyle: {
                                    type: 'dashed',
                                    color: { //设置渐变
                                        type: 'linear',
                                        // x: 0,
                                        y: 0,
                                        x2: 0,
                                        y2: 1,
                                        colorStops: [{
                                            offset: 0,
                                            color: 'red ' // 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: 'red' // 100% 处的颜色
                                        }],
                                        global: false // 缺省为 false
                                    }
                                },
                            }
                        },
                        data: [{
                            yAxis: 3.61,
                        }, {
                            yAxis: 6.11,
                        }]
                    },

                }, ],
                color: ['#3366CC'],
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'line'
                    }
                },
                dataZoom: [ //滑动条
                    {
                        type: 'inside',
                        realtime: true,
                        start: startLength,
                        end: 100,
                        startValue: 0
                    }
                ],
            };
            myChart2.setOption(option2);



        }
    })
}
getTime(getPreMonth(), getNowMonth());
// getTime()